<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>TodoList</title>
	<style>
		.root {
			text-align: center;
		}

		.headDiv {
			background-color: #c0c0c0;
			height: 120px;
			width: 100%;
			position: fixed;
			top: 0px;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		#todoDiv {
			margin-top: 150px;
		}
	</style>
</head>

<body>
	<div class="root">
		<div class="headDiv">
			<label for="inputValue">输入：</label>
			<input id="inputValue" type="text" />
			<input type="button" value="添加" id="addBtn" />
		</div>
		<div id="todoDiv">

		</div>
	</div>
</body>
<script>
	// 页面加载后再去加载JavaScript
	window.onload = function () {
		let ele = document.createElement('script');
		ele.async = false;
		ele.src = './src/newtodo.js';
		ele.addEventListener('load', () => {
			ele.parentNode.removeChild(ele);
			ele.removeEventListener('load', arguments.callee, false);
		}, false);
		document.body.appendChild(ele);
	}
</script>

</html>